<template>
	<view class="top"></view>
	<view
		style="font-size: 36rpx;color: #000;display: flex;justify-content: space-between;align-items: center;position: relative;">
	
		<view @click="showChooseTerm"
			style="position: absolute;top: 0;left: 0;width: 100%;height: 100%;display: flex;justify-content: center;align-items: center;z-index:103">
			{{title}}
			<u-icon name="arrow-down" color="#000" size="28" margin-left="10rpx"></u-icon>
		</view>
	
	
		<view
			style="width: 140rpx;height: 80%;background-color: #588cf3;border-radius: 20rpx;display: flex;justify-content: center;align-items: center;color: #fff;margin-left: 10rpx;position: relative;z-index: 104;" @click="fanhui">
			返回
			<!-- <image src="../../../static/icons/icons8-settings.svg"
				style="width: 42rpx;height: 42rpx;margin-left: 4rpx;"></image> -->
		</view>
	</view>
</template>

<script>
export default{
	name:'naviBar',
	data(){
		return{
			title:''
		}
	},
	methods:{
		fanhui(){
			uni.navigateTo({
				url: '/pages/index'
			})
		}
	},
	created(){
		var xuehao = getApp().globalData.xuehao
		if (xuehao) {
			// xuehao = Number(xuehao[3] + xuehao[4])
			// console.log(xuehao)
			var date = new Date()
			// const list = ['大一', '大二', '大三', '大四', '大五']
			this.title = date.getFullYear()
			// console.log(date.getMonth())
			if (date.getMonth() > 6 || date.getMonth() < 0) {
				this.title = this.title + '-秋季'
			} else {
				this.title = this.title + '-春季'
			}
		} else {
			this.title = '课程人员密度分布'
		}
		console.log(this.title)
	}
};
</script>

<style>
	.top{
		width: 100vw;
		height: 100rpx;
	}
</style>